<template>
  <div>
    <h2>设备信息</h2>
    <ul>
      <li>型号: {{ deviceInfo?.model }}</li>
      <li>平台: {{ deviceInfo?.platform }} {{ deviceInfo?.version }}</li>
      <li>UUID: {{ deviceInfo?.uuid }}</li>
      <li>制造商: {{ deviceInfo?.manufacturer }}</li>
      <li>是否为模拟器: {{ deviceInfo?.isVirtual }}</li>
    </ul>
  </div>
</template>

<script setup>
import {ref, onMounted} from 'vue'
import {getDeviceInfo} from "@/composable/deviceInfoService.js";

const deviceInfo = ref(null)
// 2. 获取设备信息
const deviceInfo1 = getDeviceInfo()
// 从全局属性中获取设备信息
deviceInfo.value = deviceInfo1
console.log('sss', deviceInfo.value)

</script>
